#ifndef DVBO_H
#define DVBO_H

#include "../Config/Export.h"
#include "../Core/IDrawer.h"
#include "../Core/TBuffer.h"

namespace epix {

class SHARED DVBO : public IDrawer
{
    public:

        DVBO();

        virtual ~DVBO();

        virtual void initialize(GLenum mode);

        virtual void addBuffer(GLenum type, const void *data, GLsizeiptr size, int count);

		virtual void update(GLenum type, const void *data, GLsizeiptr size);
		
		virtual void clear();

		virtual void bind();
		virtual void unBind();
		
        virtual void draw(unsigned int count);
        virtual void drawRange(unsigned int count, unsigned int first = 0);

    private:

        IndexBuffer *_index;
        VertexBuffer *_posV, *_texV, *_norV;
        GLenum _mode;
};

}

#endif
